//
//  ModelOfDataCommendScenicSpotView.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/3.
//  Copyright © 2016年 KX. All rights reserved.
#import "ModelOfLocal_basicCommendScenicSpotView.h"
#import "ModelOfNot_missCommendScenicSpotView.h"
#import "ModelOfMostPopularCommendScenicSpotView.h"
#import "ModelOfDataCommendScenicSpotView.h"
#import "ModelOfIconListCommendScenicSpotView.h"
@implementation ModelOfDataCommendScenicSpotView
- (void)setValue:(id)value forKey:(NSString *)key{
    NSMutableArray *array1 = [NSMutableArray array];
    NSMutableArray *array2 = [NSMutableArray array];
    NSMutableArray *array3 = [NSMutableArray array];
    NSMutableArray *array4 = [NSMutableArray array];
    NSMutableArray *array5 = [NSMutableArray array];
    if ([key isEqualToString:@"planto"]) {
        self.planto = [value integerValue];
    }if ([key isEqualToString:@"guide_num"]) {
        self.guide_num = [value integerValue];
    }if ([key isEqualToString:@"want_num"]) {
        self.want_num = [value integerValue];
    }if ([key isEqualToString:@"city_id"]) {
        self.city_id = value;
    }if ([key isEqualToString:@"cnname"]) {
        self.cnname = value;
    }if ([key isEqualToString:@"enname"]) {
        self.enname = value;
    }if ([key isEqualToString:@"country"]) {
        self.country = value;
    }if ([key isEqualToString:@"lat"]) {
        self.lat = value;
    }if ([key isEqualToString:@"lon"]) {
        self.lon = value;
    }if ([key isEqualToString:@"city_map"]) {
        self.city_map = value;
    }if ([key isEqualToString:@"local_basic_type"]) {
        self.local_basic_type = value;
    }if ([key isEqualToString:@"city_pic"]) {
        for (NSString *string in value) {
            [array1 addObject:string];
        }
                self.city_pic = array1;
    }if ([key isEqualToString:@"icon_list"]) {
        for (NSDictionary *dic in value) {
            ModelOfIconListCommendScenicSpotView *model = [ModelOfIconListCommendScenicSpotView modelWithDic:dic];
            [array2 addObject:model];
        }
        self.icon_list = array2;
    }if ([key isEqualToString:@"most_popular"]) {
        for (NSDictionary *dic in value) {
            ModelOfMostPopularCommendScenicSpotView *model = [ModelOfMostPopularCommendScenicSpotView modelWithDic:dic];
            [array3 addObject:model];
        }
        self.most_popular = array3;
    }if ([key isEqualToString:@"weather"]) {
        self.info = [value objectForKey:@"info"];
        self.low_temp = [value objectForKey:@"low_temp"];
        self.high_temp = [value objectForKey:@"high_temp"];
    }if ([key isEqualToString:@"not_miss"]) {
        for (NSDictionary *dic in value) {
            ModelOfNot_missCommendScenicSpotView *model = [ModelOfNot_missCommendScenicSpotView modelWithDic:dic];
            [array4 addObject:model];
        }
        self.not_miss = array4;
    }if ([key isEqualToString:@"local_basic"]) {
        for (NSDictionary *dic in value) {
            ModelOfLocal_basicCommendScenicSpotView *model = [ModelOfLocal_basicCommendScenicSpotView modelWithDic:dic];
            [array5 addObject:model];
        }
        self.local_basic = array5;
    }
}
@end
